PreviousNextTracker indexSee it online !

(210/212) 533 - Create a new file from selection

Not sure if this should be in jEdit feature requests or jEdit plugins feature requests.

Please add "Create a new file from selection" menu item.

An additional useful feature would be to immeditely save this new file to a (configurable) directory under a configurable name dependent on the original file name. For example: editing file Ring.pm I want to create the file /home/porton/t/Ring-extract.pm where /home/porton/t/ is a configurable directory and the file name is determined by the option %s-extract somewhere in preferences.

Submitted porton - 2017-03-12 20:19:23.510000 Assigned kerik-sf
Priority 5 Labels
Status pending Group none
Resolution None

Comments

2017-03-20 21:00:56.298000
kerik-sf

This is clearly the job of a macro.
See attached macro for an example.

save_extract.bsh (785B)

2017-03-20 21:01:12.476000
kerik-sf

- **status**: open --> pending
- **assigned_to**: Eric Le Lay

2017-10-28 22:29:47.420000
ngc

I agree to@Eric Le Jay and would close this.

2017-11-02 22:15:48.322000
tsourick

While the additional feature is too specific to add to the core, having "create a file from selection" would be nice, I think.

2017-11-02 22:30:23.219000
ngc

What for if a macro can do?

And after all: It's just a three-key workflow (besides naming the file):

After Marking the selection: Copy - New Buffer - Paste

2017-11-04 00:31:04.746000
tsourick

I can not say if three-key flow is too much or not. But if the feature is implemented, I feel like the right place for it is core, so that it also can be placed under File menu (near to others "New ...") and others (like context one) out of the box.

Probably, as the author needs the whole chain of those specific actions, "create from selection" is out of the scope of this request.